<%@ tag body-content="empty"%>
<%@ attribute name="name" rtexprvalue="true" required="true"%>
<%@ attribute name="items" rtexprvalue="true" required="true" type="java.util.Map"%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<script type="text/javascript">
<!--
$include("tags/tabPage/style.css");
$include("tags/tabPage/lib.js");
//-->
</script>


<script type="text/javascript">
<!--
var ${name}=new TabPage("${name}_label_","${name}_body_");
//-->
</script>

<table width="100%" height="24" class="menuArea">
	<tr>
		<td class="menuSpaceArea">&nbsp;</td>
		<c:forEach items="${items}" var="item" varStatus="status">

			<c:choose>
				<c:when test="${status.first}">
					<td width="80" class="menuSelectArea" style="cursor:hand;" id="${name}_label_${status.count}" onclick="${name}.select(${status.count});">${item.key}</td>
				</c:when>
				<c:otherwise>
					<td width="80" class="menuFreeArea" style="cursor:hand;" id="${name}_label_${status.count}" onclick="${name}.select(${status.count});">${item.key}</td>
				</c:otherwise>
			</c:choose>

			<c:choose>
				<c:when test="${status.last}">
					<script type="text/javascript">
					<!--
						${name}.setCount(${status.count});
					//-->
					</script>
				</c:when>
				<c:otherwise>
					<td width="20" class="menuSpaceArea"></td>
				</c:otherwise>
			</c:choose>

		</c:forEach>
		<td class="menuSpaceArea">&nbsp;</td>
	</tr>
</table>

<c:forEach items="${items}" var="item" varStatus="status">
	<c:choose>
		<c:when test="${status.first}">
			<div id="${name}_body_${status.count}">${item.value}</div>
		</c:when>
		<c:otherwise>
			<div id="${name}_body_${status.count}" style="display:none;">${item.value}</div>
		</c:otherwise>
	</c:choose>
</c:forEach>







